class controls:
    def __init__(self, action, up, down, left, right):
        self.action = action
        self.up = up
        self.down = down
        self.left = left
        self.right = right
        
    def getAction(self, key):
        if key=='up':
            return self.up
        elif key=='down':
            return self.down
        elif key=='left':
            return self.left
        elif key=='right':
            return self.right
        elif key=='action':
            return self.action